Status TopologicalSort(GraphAdjList GL){
	EdgeNode *e;
	int i,k,gettop;
	int top;
	int count=0;
	int *stack;
	stack=(int*)malloc(GL->numVertexes * sizeof(int));
	for (i=0;i<GL->numVertexes;i++)
	{
		if (0==GL->adjList[i].in)
		{
			stack[++top]=i;
		}
	}
	top2=0;
	etv=(int*)malloc(GL->numVertexes*sizeof(int));
	for (i=0;i<GL->numVertexes;i++)
	{
		etv[i]=0;
	}
	stack2=(int*)malloc(GL->numVertexes*sizeof(int));
	while(top!=0){
		gettop=stack[top--];
		count++;
		stack2[++top2]=gettop;
		for (e=GL->adjList[gettop].firstedge;e;e=e->next)
		{
			k=e->adjvex;
			if (!(--GL->adjList[k].in))
			{
				stack[++top]=k;
				if ((etv[gettop]+e->weight)>etv[k])
				{
					etv[k]=etv[gettop]+e->weight;
				}
			}
		}
	}
	if (count<GL->numVertexes)
	{
		return ERROR;
	}else{
		return Ok;
	}
}